package com.yunyao.common.dto.audit;

import lombok.Getter;

/**
 * @author xingjishuai
 * @date 2024-08-16
 */
@Getter
public enum AuditFlowTypeEnums {
    MODEL_NAME_SALE_CONTRACT("salecontract", "销售合同"),
    MODEL_NAME_PURCHASE_CONTRACT("purchasecontract", "采购合同"),
    MODEL_NAME_PURCHASE_APPLY("purchaseapply", "项目订单"),
    MODEL_NAME_RECONCILIATION("reconciliation", "项目对账单"),
    MODEL_NAME_RECONCILIATION_SETTLEMENT("reconciliationSettlement", "项目结算单"),
    MODEL_NAME_SP_RECONCILIATION("spreconciliation", "供应商对账单"),
    MODEL_NAME_SUB_SALE_CONTRACT("subsalecontract", "销售补充合同"),
    MODEL_NAME_SUB_PURCHASE_CONTRACT("subpurchasecontract", "采购补充合同"),
    MODEL_NAME_SP_RECONCILIATION_SETTLEMENT("spreconciliationSettlement", "供应商结算单"),
    MODEL_NAME_SALE_CONTRACT_PRE_PAYMENT("salecontractprepayment", "销售合同-预付款"),
    MODEL_NAME_SO_PRE_PAYMENT("soprepayment", "项目订单预付款"),
    MODEL_NAME_PO_PRE_PAYMENT("poprepayment", "供货订单预付款"),
    MODEL_NAME_RECEIVE("receive", "收款管理"),
    MODEL_NAME_PAYMENT("payment", "付款管理");
    private String type;
    private String name;

    AuditFlowTypeEnums(String type, String name) {
        this.type = type;
        this.name = name;
    }
    public static String typeOfName(String type){
        for (AuditFlowTypeEnums value : AuditFlowTypeEnums.values()) {
            if (value.getType().equals(type)) {
                return value.getName();
            }
        }
        return null;
    }


}
